﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace FormBase
{
    static class Program
    {
        public static FMain gFMain;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (CProject.Begin(args))
            {

                gFMain = new FMain();
                Application.Run(gFMain);
            }
            else
            {
                //    Application.Exit();
                CProject.End();
            }
        }
        static void Application_ApplicationExit(object sender, EventArgs e)
        {
            // EndAppHere
            CProject.End();
        }

    }
}
